#pragma once

#include "allegrowindow.h"

#include <vector>
#include <string>

class CTextBox : public CAllegroWindow
{
public:
	CTextBox();
	
	virtual void SetText(const char* text);
	virtual void SetRect(int x1, int y1, int x2, int y2);
	virtual void Draw(BITMAP* sb);
	virtual void SetFont(ALFONT_FONT* font);
	virtual ~CTextBox(void);
private:
	std::vector<std::string> m_lines;
	
	int m_border_width_tb;
	int m_border_width_lr;
	int m_text_space;
	bool readyToOutput;
	
	void BuildLines();
protected:
	virtual void RedrawBuffer();
};
